package com.mobimap.nhom9.gui;

public abstract class ChangeMap {

	public int start_col;	//cot bat dau cua map
	public int  start_row;	//dong bat dau cua map
	public int left_row;	//keo chuot qua trai left_row pixel
	public int right_row;	//keo chuot qua phai
	public int top_col;		//keo chuot len tren
	public int bot_col;		//keo chuot xuong duoi
	public float stmouse_x, stmouse_y;//position when mouse down
	public float endmouse_x, endmouse_y;	//position when mouse up
	public boolean up;		//dang keo map len
	public boolean left;	//dang keo map sang trai
	public int cur_position_x; //vi tri hien thoi cua view man hinh
	public int cur_position_y;
	public int scroll_col;	//so cot dich chuyen khi keo chuot
	public int scroll_row;
	
	public ChangeMap() {
		// TODO Auto-generated constructor stub
		start_col = 0;
		start_row = 0;
		left_row = 0;
		right_row = 0;
		top_col = 0;
		bot_col = 0;
		stmouse_x = 0;
		stmouse_y = 0;
		endmouse_x = 0;
		endmouse_y = 0;
		cur_position_x = 0;
		cur_position_y = 0;
		scroll_col = 0;
		scroll_row = 0;
	}

	public int CheckChangMap()
	{
		int result = 0;
		if(cur_position_x < 256)
			result = 1;
		if(cur_position_x + 480 > 256*5)
			result = 2;
		if(cur_position_y < 256)
			result = 3;
		if(cur_position_y + 724 > 256*8)
			result= 4;
		if(cur_position_x < 256 && cur_position_y < 256)
			result = 5;
		if(cur_position_x + 480 > 256*5 && cur_position_y + 724 > 256*8)
			result = 6;
		if(cur_position_x < 256 && cur_position_y + 724 > 256*8)
			result = 7;
		if(cur_position_x + 480 > 256*5 && cur_position_y < 256)
			result = 8;
		return result;
	}
	
	
	public int getStart_col() {
		return start_col;
	}


	public void setStart_col(int start_col) {
		this.start_col = start_col;
	}


	public int getStart_row() {
		return start_row;
	}


	public void setStart_row(int start_row) {
		this.start_row = start_row;
	}


	public int getLeft_row() {
		return left_row;
	}


	public void setLeft_row(int left_row) {
		this.left_row = left_row;
	}


	public int getRight_row() {
		return right_row;
	}


	public void setRight_row(int right_row) {
		this.right_row = right_row;
	}


	public int getTop_col() {
		return top_col;
	}


	public void setTop_col(int top_col) {
		this.top_col = top_col;
	}


	public float getStmouse_y() {
		return stmouse_y;
	}


	public void setStmouse_y(float stmouse_y) {
		this.stmouse_y = stmouse_y;
	}


	public float getStmouse_x() {
		return stmouse_x;
	}


	public void setStmouse_x(float stmouse_x) {
		this.stmouse_x = stmouse_x;
	}


	public float getEndmouse_x() {
		return endmouse_x;
	}


	public void setEndmouse_x(float endmouse_x) {
		this.endmouse_x = endmouse_x;
	}


	public int getBot_col() {
		return bot_col;
	}


	public void setBot_col(int bot_col) {
		this.bot_col = bot_col;
	}


	public float getEndmouse_y() {
		return endmouse_y;
	}


	public void setEndmouse_y(float endmouse_y) {
		this.endmouse_y = endmouse_y;
	}
	
}
